<?php
    if(is_array($result))
	{
		header('Content-Type: application/json; Charset=UTF-8',true);
		$jsonData = array('page'=>$clasificacionFN->page,'total'=>$clasificacionFN->numeroRegistros,'rows'=>array());
		foreach ($result as $key => $obj)
		{
		//If cell's elements have named keys, they must match column names
		//Only cell's with named keys and matching columns are order independent.
			$entry = array('id'=>$obj->getClasificId(),
			    'cell'=>array(
			    
			            'clasificacionId' =>$obj->getClasificId(),
			            'descripcion'=>utf8_encode($obj->getDescripcion()),
			            'referencia'=>utf8_encode($obj->getReferencia()),
			            'activo'=>$obj->getActivo(),
			            'opciones'=>"<img border='0' title='Detalle Item' src='/gourmet-express/trunk/imgs/icons/application_view_list.png' onclick=fn_detalle('". $obj->getClasificId()."') style='cursor:pointer;'><img border='0' title='Editar Item' src='/gourmet-express/trunk/imgs/icons/page_edit.png' onclick=fn_editar('". $obj->getClasificId()."') style='cursor:pointer;'>"
			    ),
			);
			$jsonData['rows'][] = $entry;
		}
		echo json_encode($jsonData);
	}?>